package com.marion.mrpc.server;

import com.marion.mrpc.codec.Decoder;
import com.marion.mrpc.codec.Encoder;
import com.marion.mrpc.codec.JSONDecoder;
import com.marion.mrpc.codec.JSONEncoder;
import com.marion.mrpc.transport.HttpTransportClient;
import com.marion.mrpc.transport.HttpTransportServer;
import com.marion.mrpc.transport.TransportServer;
import lombok.Data;

/**
 * RPC Server的配置
 * @author marion
 * @date 2021/9/4
 */
@Data
public class RpcServerConfig {

    /**
     *    1. 传输协议
     *    2. 加解密
     *    3. 端口
     */
    private Class<? extends TransportServer> transport = HttpTransportServer.class;

    private Class<? extends Encoder> encoder = JSONEncoder.class;

    private Class<? extends Decoder> decoder = JSONDecoder.class;

    private int port = 3000;

}
